import { getSongDetail } from '@/services/player';

const changeCurrentSongAction = (currentSong) => ({
    type: "currentSong",
    currentSong
})



export const getSongDetailAction = (ids) => {
    return (dispatch) => {
        getSongDetail(ids).then(res => {
            const song = res.songs && res.songs[0];
            dispatch(changeCurrentSongAction(song));
        })
    }
}